-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add count of one time keys to sync stream #2237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, but count_e2e_one_time_keys
has a cache, and I'm unconvinced it will be correctly invalidated in the synchotrons when a key is claimed in the main process.
Oops, yeah. It now streams the invalidations to workers. |
(The sqlite failure is spurious as it built on a box that didn't have tox installed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you missed one of the calls:
synapse/synapse/storage/end_to_end_keys.py
Line 241 in f85a415
self.count_e2e_one_time_keys.invalidate, (user_id, device_id,) |
LGTM otherwise
But i used grep and everything! :( |
synapse/storage/end_to_end_keys.py
Outdated
@@ -240,6 +240,9 @@ def _claim_e2e_one_time_keys(txn): | |||
txn.call_after( | |||
self.count_e2e_one_time_keys.invalidate, (user_id, device_id,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now redundant?
Apparently you fail at grep. |
And editing code too. Sigh. applies more coffee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Where it is available, use the one_time_keys_count returned by /sync instead of polling the server for it. This was added to synapse in matrix-org/synapse#2237.
This adds the following to a sync result: